Ubuntu 17.04
Sponsored Link

Configure NIS Client
2017/04/23
 
Configure NIS Client to bind NIS Server.
[1] Install nis packages.
root@www:~#
apt -y install nis
Preconfiguring packages ...
# input domain name

 +----------------------------| Configuring nis |----------------------------+
 | Please choose the NIS "domainname" for this system. If you want this      |
 | machine to just be a client, you should enter the name of the NIS domain  |
 | you wish to join.                                                         |
 |                                                                           |
 | Alternatively, if this machine is to be a NIS server, you can either      |
 | enter a new NIS "domainname" or the name of an existing NIS domain.       |
 |                                                                           |
 | NIS domain:                                                               |
 |                                                                           |
 | srv.world_____________________________________________________________    |
 |                                                                           |
 |                                  <Ok>                                     |
 |                                                                           |
 +---------------------------------------------------------------------------+
[2] Configure as a NIS Client.
root@www:~#
vi /etc/yp.conf
#
# yp.conf       Configuration file for the ypbind process. You can define
#               NIS servers manually here if they can't be found by
#               broadcasting on the local net (which is the default).
#
#               See the manual page of ypbind for the syntax of this file.
#
# IMPORTANT:    For the "ypserver", use IP addresses, or make sure that
#               the host is in /etc/hosts. This file is only interpreted
#               once, and if DNS isn't reachable yet the ypserver cannot
#               be resolved and ypbind won't ever bind to the server.

# ypserver ypserver.network.com
# add to the end: [domain name] [server] [NIS server's hostname]

domain srv.world server dlp.srv.world
root@www:~#
vi /etc/nsswitch.conf
passwd:     compat
nis
   
# line 7; add

group:     compat
nis
   
# add

shadow:     compat
nis
   
# add
hosts:     files resolve [!UNAVAIL=return] dns
nis
   
# add
# set follows if need (create home directory automatically if none)

root@www:~#
vi /etc/pam.d/common-session
# add to the end

session optional        pam_mkhomedir.so skel=/etc/skel umask=077

root@www:~#
systemctl restart nis

root@www:~#
Ubuntu 17.04 www.srv.world ttyS0
www login:
debian
   
# NIS User

Password:
Welcome to Ubuntu 17.04 (GNU/Linux 4.10.0-19-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage


The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.


The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

Creating directory '/home/debian'.
debian@www:~$    
# just logined
# try to change NIS password

debian@www:~$
Changing NIS account information for debian on dlp.srv.world.
Please enter old password:
Changing NIS password for debian on dlp.srv.world.
Please enter new password:
Please retype new password:

The NIS password has been changed on dlp.srv.world.
 
Tweet